<?php
namespace Alipay\EasySDK\Providers;

use Illuminate\Support\ServiceProvider;
use Alipay\EasySDK\Contracts\OrderInterface;

class AlipayServiceProvider extends ServiceProvider{

    public function register()
    {
        $this->app->bind('alipay', 'Alipay\EasySDK\Alipay');
        class_alias(OrderInterface::class, 'AlipayOrderInterface');
    }

    public function boot()
    {
        if ($this->app->runningInConsole()){
            // config
            $this->publishes([
                __DIR__.'/../../config/alipay.php' => config_path('alipay.php'),
            ], 'alipay.config');
        }
    }
}